<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="pragram" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache, must-revalidate"/>
    <meta http-equiv="expires" content="0"/>
    <meta name="renderer" content="webkit"/>
    <title>案源管理</title>

    <link rel="stylesheet" href="/assets/css/lib/bootstrap.min.css">
    <link rel="stylesheet" href="/assets/css/lib/pagination.css">

    <link rel="stylesheet" href="/assets/css/common.css">
    <link rel="stylesheet" href="/assets/css/source_manage.css">

</head>
<body>
<div  id="cms">
    <jsp:include page="title_bar.jsp"/>
    <jsp:include page="tab_bar.jsp"/>
    <div class="cms-content">
        <div class="current-place">
            <div class="place-title">当前位置:</div>
            <div class="place-val">首页/案源管理</div>
        </div>
        <div class="seek-box">
            <div class="common-title">
                <div class="common-left-line"></div>
                <div class="common-text">条件查询</div>
            </div>
            <div class="seek-content">
                <div class="seek-group">
                    <div class="seek-unit">
                        <span class="seek-unit-left">客户姓名</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control uname">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">客户电话</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control uphone">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">法海对接客服</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control ctname">
                        </div>
                    </div>

                    <div class="seek-unit">
                        <span class="seek-unit-left">案源发生地</span>
                        <div class="seek-unit-right">
                            <div id="distpicker1" class="distpicker">
                                <div class="form-group">
                                    <select class="form-control province"></select>
                                </div>
                                <div class="form-group">
                                    <select class="form-control city"></select>
                                </div>
                                <div class="form-group">
                                    <select class="form-control district"></select>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>



                <div class="seek-group">
                    <div class="seek-unit">
                        <span class="seek-unit-left">上报律师姓名</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control ptname">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">上报律师电话</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control ptphone">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">上报时间</span>
                        <div class="seek-unit-right">
                            <input type="text" class="Wdate " id="putdatetime_condition" date="true"/>
                        </div>
                    </div>
                </div>
                <div class="seek-group">
                    <div class="seek-unit">
                        <span class="seek-unit-left">接单律师姓名</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control gtname">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">接单律师电话</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control gtphone">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">接单时间</span>
                        <div class="seek-unit-right">
                            <input type="text" class="Wdate " id="getdatetime_condition" date="true"/>
                        </div>
                    </div>
                    <div class="seek-unit">
                        <div class="seek-unit-left seek-btn" onclick="initPagination()">
                            查询
                        </div>
                        <div class="seek-unit-right seek-clear">
                            清空条件
                        </div>



                    </div>
                </div>
            </div>
        </div>
        <div class="table-box">
            <div class="table-top">
                <table class="table table-bordered" id="table1">
                    <thead>
                        <tr>

                            <th rowspan="2"></th>
                            <th rowspan="2">案源ID</th>
                            <th rowspan="2" style="min-width: 100px">客户名称</th>
                            <th rowspan="2" style="min-width: 100px">客户电话</th>
                            <th colspan="4" style="background: #fff; min-width: 350px">上报律师信息</th>
                            <th colspan="4" style="background: #fff; min-width: 350px">接单律师信息</th>
                            <th rowspan="2" style="min-width: 140px">
                                <div>客户付费意愿</div>
                                <select class="form-control uwant-option"  onchange="uwant_change(this)" >
                                    <option value="">全部</option>
                                    <option value="0">无 </option>
                                    <option value="1">一般</option>
                                    <option value="2">愿意</option>
                                    <option value="3">强烈</option>
                                </select>
                            </th>
                            <th rowspan="2" style="min-width: 100px">案源类型</th>
                            <th rowspan="2" style="min-width: 100px">案源发生地</th>
                            <th rowspan="2" style="min-width: 200px">案源简要描述</th>
                            <th rowspan="2" style="min-width: 140px">
                                <div>案源状态</div>
                                <select class="form-control aystat-option" onchange="aystat_change(this)" >
                                    <option value="">全部</option>
                                    <option value="0">未发布</option>
                                    <option value="1">已发布</option>
                                    <option value="2">已接单</option>
                                    <option value="3">已结案</option>
                                    <option value="4">已结算</option>
                                </select>
                            </th>
                            <th colspan="6" style="background: #fff ; min-width: 600px">佣金信息</th>
                            <th rowspan="2" style="min-width: 100px">法海对接客服</th>
                            <th rowspan="2" style="min-width: 100px">回访记录</th>
                            <th rowspan="2" style="min-width: 100px">操作</th>
                        </tr>
                        <tr>
                            <th style="min-width: 80px">律师姓名</th>
                            <th>律师电话</th>
                            <th>服务地区</th>
                            <th style="min-width: 200px">上报时间</th>
                            <th style="min-width: 160px">律师姓名</th>
                            <th>律师电话</th>
                            <th>服务地区</th>
                            <th style="min-width: 200px">上报时间</th>
                            <th>标的金额(元)</th>
                            <th>佣金比例(%)</th>
                            <th>佣金金额(元)</th>
                            <th>上报奖励(元)</th>
                            <th>接单奖励(元)</th>
                            <th>
                                <div>是否回款</div>
                                <select class="form-control client-status" >
                                    <option value="">全部</option>
                                    <option value="0">未回款</option>
                                    <option value="1">接单回款</option>
                                    <option value="2">上报回款</option>
                                </select>
                            </th>
                        </tr>
                    </thead>
                    <tbody id="tbody_anyuan">
                       <%-- <tr>
                            <td>
                                <input type="checkbox" class="check-unit"/>
                            </td>
                            <td>1565234678979804</td>
                            <td>樊娇娇</td>
                            <td>13444444444</td>
                            <td>与亨利</td>
                            <td>13544384638</td>
                            <td>广西省/桂林市/无名市</td>
                            <td>2016/03/12  17:43</td>
                            <td>陈一凡</td>
                            <td>13462857386</td>
                            <td>广西省/桂林市/无名市</td>
                            <td>2016/03/12  17:43</td>
                            <td>有</td>
                            <td>经济纠纷</td>
                            <td>广西省/桂林市/无名市</td>
                            <td class="two-row">
                                <div class="p">
                                    状态修改为冻结后客户将不能实现咨询状态修改为冻结后客户将不能实现咨询状态修改为冻结后客户将不能实现咨询状态修改为冻结后客户将不能实现咨询
                                </div>
                                <img src="/assets/images/rectangle.png">
                            </td>
                            <td>已受理</td>
                            <td>48000</td>
                            <td>5</td>
                            <td>500</td>
                            <td>1000</td>
                            <td>是</td>
                            <td>陈海鹏</td>
                            <td class="two-row">
                                <div class="p">回访记录回访记录回访记录回访记录回访记录回访记录</div>
                                <img src="/assets/images/rectangle.png">
                            </td>
                            <td>
                                <div class="edit-btn">编辑</div>
                            </td>
                        </tr>
--%>




                    </tbody>
                    <script id="list1" type="text/html">
                        <!for(k in result){
                        var v=result[k];
                        !>
                        <tr>
                            <td>
                                <input type="checkbox" class="check-unit"/>
                            </td>
                            <td class="aycode"><!=v.aycode!></td>
                            <td class="uname"><!=v.uname!></td>
                            <td class="uphone"><!=v.uphone!></td>
                            <td class="ptname"><!=v.ptname!></td>
                            <td class="ptphone"><!=v.ptphone!></td>
                            <td class="ptcid"><!=v.ptcid!></td>
                            <td class="putdatetime"><!=getFormatDate(v.putdatetime)!></td>

                            <td class="gtname"><!=v.gtname==null?'':v.gtname!></td>
                            <td class="gtphone"><!=v.gtphone==null?'':v.gtphone!></td>
                            <td class="gtcid"><!=v.gtcid==null?'':v.gtcid!></td>
                            <td class="getdatetime"><!=getFormatDate(v.getdatetime)!></td>

                            <td class="uwantStr"><!=renderUwant(v.uwant)!></td>
                            <td class="uwant" style="display: none;"><!=v.uwant!></td>
                            <td class="aytype"><!=v.aytype==null?'':v.aytype!></td>
                            <td class="ayarea"><!=v.ayarea==null?'': parseAyarea( v.ayarea ) !></td>
                            <td class="aytxt two-row" onclick="showDetail(this)"><div class="p" ><!=v.aytxt!></div> <img src="/assets/images/rectangle.png"  ></td>
                            <td class="aystatstr" ><!=renderAystat(v.aystat)!></td>
                            <td class="aystat" style="display: none;"><!=v.aystat!></td>

                            <td class="aymoney"><!=v.aymoney==null?'':back_money_handler(v.aymoney/100)!></td>
                            <td class="ayrate"><!=v.ayrate==null?'':v.ayrate!></td>
                            <td class="aypush"><!=v.aypush==null?'':back_money_handler(v.aypush/100)!></td>
                            <td class="ayextra"><!=v.ayextra==null?'':back_money_handler(v.ayextra/100)!></td>
                            <td class="aygetpay"><!=v.aygetpay==null?'':back_money_handler(v.aygetpay/100)!></td>
                            <td class="isreturnstr" ><!=renderIsreturn(v.isreturn)!></td>
                            <td class="isreturn" style="display: none;"><!=v.isreturn!></td>
                            <td class="ctname"><!=v.ctname==null?'':v.ctname!></td>
                            <td class="id" style="display: none"><!=v.id!></td>
                            <td class="hfrecord two-row" onclick="showDetail(this)"><div class="p"><!=v.hfrecord==null?'':v.hfrecord!></div><img src="/assets/images/rectangle.png"  ></td>

                            <td class="operate">

                                <!if(role==0){!>

                                <div class="edit-btn"
                                     data-value="<!=v.id!>"
                                     id-value="<!=v.id!>"
                                     onclick="edit_btn_show(this)">编辑
                                </div>

                                <!}!>

                            </td>
                        </tr>
                        <!}!>
                    </script>

                </table>
            </div>


            <div class="table-bottom clearfix" >
                <div class="check-all" style="display: none">
                    <input type="checkbox" id="check-all">
                    <label for="check-all">全选</label>
                </div>
                <div class="freeze" style="display: none">批量冻结</div>
                <div class="unfreeze" style="display: none">批量解冻</div>
                <div id="Pagination" class="pagination"><!-- 这里显示分页--></div>
                <span id="currentCount"></span>
            </div>
        </div>
    </div>
</div>

</div>
<div class="cms-modal-ms" id="freeze-info">
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">操作提醒</div>
        <div class="cms-madal-content">
            <div class="freeze-quesition"> 确定要将选中的12个用户冻结吗?</div>
            <div class="freeze-info">冻结后客户将不能实现咨询、关注律师、更换专属律师 、充值等功能。</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm freeze-confirm">确定</button>
            <button type="button" class="cms-cancel freeze-cancel">取消</button>
        </div>
    </div>
</div>

<!--编辑信息-->
<div class="cms-modal-lg" id='edit-info'>
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">编辑信息</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <input type="hidden" class="form-control" id="id" >
                    <div class="state-left">案源状态</div>
                    <div class="state-right">
                        <select class="form-control edit-client-status" id="aystat">
                            <option value="">全部</option>
                            <option value="0">未发布</option>
                            <option value="1">已发布</option>
                            <option value="2">已接单</option>
                            <option value="3">已结案</option>
                            <option value="4">已结算</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">标的金额</div>
                    <div class="state-right">
                        <input type="text" class="form-control" id="aymoney">
                        <span>元</span>
                    </div>
                </div>
                <div class="two-stage">
                    <div class="state-left">佣金比例</div>
                    <div class="state-right">
                        <input type="text" class="form-control" id="ayrate">
                        <span>%</span>
                    </div>
                </div>
                <div class="two-stage">
                    <div class="state-left">佣金金额</div>
                    <div class="state-right">
                        <input type="text" class="form-control" id="aypush">
                        <span>元</span>
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">上报奖励</div>
                    <div class="state-right">
                        <input type="text" class="form-control" id="ayextra">
                        <span>元</span>
                    </div>
                </div>
                <div class="two-stage">
                    <div class="state-left">接单奖励</div>
                    <div class="state-right">
                        <input type="text" class="form-control" id="aygetpay">
                        <span>元</span>
                    </div>
                </div>
                <div class="two-stage">
                    <div class="state-left">是否回款</div>
                    <div class="state-right">
                        <select class="form-control " id="isreturn" >
                            <option value="">全部</option>
                            <option value="0">未回款</option>
                            <option value="1">接单回款</option>
                            <option value="2">上报回款</option>
                        </select>
                    </div>
                </div>
            </div>
            <div>回访记录</div>
            <div class="back-record">
                <textarea class="common-remark" id="hfrecord"></textarea>
            </div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm edit-info-confirm" onclick="editConfirm()">确定</button>
            <button type="button" class="cms-cancel edit-info-cancel">取消</button>
        </div>
    </div>
</div>


</body>
<script type="text/javascript" src="/assets/js/lib/jquery-1.12.3.js"></script>
<script type="text/javascript" src="/assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="/assets/js/lib/modal.js"></script>
<script type="text/javascript" src="/assets/js/lib/jquery.ellipsis.js"></script>
<script type="text/javascript" src="/assets/js/lib/cmsmodal.js"></script>

<script type="text/javascript" src="/assets/js/lib/distpicker.data.js"></script>
<script type="text/javascript" src="/assets/js/lib/distpicker.js"></script>
<script type="text/javascript" src="/assets/js/lib/jquery.pagination.js"></script>

<script type="text/javascript" src="/assets/js/lib/My97DatePicker/WdatePicker.js"></script>

<script type="text/javascript" src="/assets/js/common.js"></script>
<script type="text/javascript" src="/assets/js/communal/template.js"></script>
<script type="text/javascript" src="/assets/js/source_manage.js"></script>
</html>